# coding=utf-8
# -*- coding: UTF-8 -*-
#
# This file is part of the kernelstudio package.
#
# (c) 2014-2025 zlin <admin@kernelstudio.com>
#
# For the full copyright and license information, please view the LICENSE file
# that was distributed with this source code.

from pydantic import Field
from pydantic_settings import BaseSettings


class RedisStandaloneConfig(BaseSettings):
    REDIS_HOST: str = Field(
        description="Type of redis host",
        default="localhost",
        envvar='REDIS_HOST'
    )

    REDIS_PORT: int = Field(
        description="Type of redis port",
        default="6379",
        envvar='REDIS_PORT'
    )

    REDIS_USERNAME: str = Field(
        description="Type of redis username",
        default="",
        envvar='REDIS_USERNAME'
    )

    REDIS_PASSWORD: str = Field(
        description="Type of redis password",
        default="",
        envvar='REDIS_PASSWORD'
    )

    REDIS_USE_SSL: bool = Field(
        description="Type of redis use ssl",
        default="false",
        envvar='REDIS_USE_SSL'
    )

    REDIS_DATABASE: int = Field(
        description="Type of redis database",
        default="0",
        envvar='REDIS_DATABASE'
    )

    REDIS_NAMESPACE: str = Field(
        description="Type of redis namespace",
        default="application",
        envvar='REDIS_NAMESPACE'
    )
